package org.study.javafx.study01.notebook.xml;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import lombok.extern.slf4j.Slf4j;

import java.util.Objects;

/**
 * @author Administrator
 */
@Slf4j
public class NotebookXml extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void init() throws Exception {
        super.init();
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        // 获取fxml
        Pane root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("/fxml/notebook.fxml")));
        Scene scene = new Scene(root);
        primaryStage.setScene(scene);
        primaryStage.setTitle("JavaFx-简易记事本");
        primaryStage.show();
    }

    @Override
    public void stop() throws Exception {
        super.stop();
    }
}
